package org.leumasjaffe.initiativeTracker.event;


import java.awt.event.ActionEvent;

import javax.swing.Action;

import org.leumasjaffe.initiativeTracker.Constants;

import edu.wpi.heineman.xml.Message;
import edu.wpi.heineman.client.ServerAccess;

@SuppressWarnings("serial")
public class DelayTurnAction extends InitiativeTrackerAction implements Action {
	
	public DelayTurnAction(String text) {
		super(text);
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		root.delay();
		String xmlString = Message.requestHeader() + "<delayRequest game='" + Constants.id + "'/></request>";
		ServerAccess.getInstance().sendRequest(new Message(xmlString));
	}
	
}
